package router

import (
	"service/app/api"

	"github.com/gin-gonic/gin"
)

func MenuRouteInit() {
	JoinRoutes(func(pubRoute, authRoute *gin.RouterGroup) {
		var menuApi = api.MenuApiCreate()
		menuAuthRoute := authRoute.Group("menu")
		menuAuthRoute.DELETE("/del", menuApi.MenuRm)
		// menuAuthRoute.GET("/havepath", menuApi.MenuHavePath)
		menuAuthRoute.POST("/addlist", menuApi.MenuAddList)
		menuAuthRoute.POST("/byids", menuApi.MenusById)
		menuAuthRoute.POST("/add", menuApi.MenuAdd)
		menuAuthRoute.GET("/all", menuApi.MenuAllGet)
		menuAuthRoute.PUT("/:id", menuApi.MenuEdit)
	})
}
